package com.jinmdz.fmis.dao.dao;

import com.jinmdz.fmis.dao.dao.provider.ChargeVerifyProvider;
import com.jinmdz.fmis.dao.model.settlement.ChargeVerifyViewItem;
import com.jinmdz.fmis.dao.model.settlement.SettleDailyExpensesAllData;
import com.jinmdz.fmis.dao.model.settlement.SettleDailyExpensesAllSettleItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.ArrayList;

/**
 * 结算日结审核Dao
 *
 * @author LiCongLu
 * @date 2020-02-21 11:18
 */
public interface ChargeVerifyDao {

    /**
     * 获取最后一个日结审核批次编号
     *
     * @param
     * @return
     * @author LiCongLu
     * @date 2020-02-21 11:36
     */
    @Select(" select verify_batch_no from charge_verify order by id desc limit 1 ")
    @ResultType(String.class)
    String getVerifyBatchNoAsLast();


    /**
     * 按照主键获取日结审核信息
     *
     * @param id 主键
     * @return
     * @author LiCongLu
     * @date 2020-02-21 17:16
     */
    @SelectProvider(type = ChargeVerifyProvider.class, method = "getChargeVerifyViewById")
    ChargeVerifyViewItem getChargeVerifyViewById(@Param("id") Integer id);


    /**
     * 按照查询条件日结审核查询费用列表
     *
     * @param data             请求条件
     * @param invoiceStateCode 作废发票编码
     * @return
     * @author LiCongLu
     * @date 2020-02-21 16:02
     */
    @SelectProvider(type = ChargeVerifyProvider.class, method = "listSettleDailyExpensesAllSettleByData")
    ArrayList<SettleDailyExpensesAllSettleItem> listSettleDailyExpensesAllSettleByData(@Param("data") SettleDailyExpensesAllData data, @Param("invoiceStateCode") Integer invoiceStateCode);

    /**
     * 按照查询条件日结审核查询日结审核列表
     *
     * @param data 请求条件
     * @return
     * @author LiCongLu
     * @date 2020-02-21 17:39
     */
    @SelectProvider(type = ChargeVerifyProvider.class, method = "listSettleDailyExpensesAllVerifyByData")
    ArrayList<ChargeVerifyViewItem> listSettleDailyExpensesAllVerifyByData(@Param("data") SettleDailyExpensesAllData data);
}
